Coherent attached processor proxy having hybrid directory

ABSTRACT

A coherent attached processor proxy (CAPP) includes transport logic having a first interface configured to support communication with a system fabric of a primary coherent system and a second interface configured to support communication with an attached processor (AP) that is external to the primary coherent system and that includes a cache memory that holds copies of memory blocks belonging to a coherent address space of the primary coherent system. The CAPP further includes one or more master machines that initiate memory access requests on the system fabric of the primary coherent system on behalf of the AP, one or more snoop machines that service requests snooped on the system fabric, and a CAPP directory having a precise directory having a plurality of entries each associated with a smaller data granule and a coarse directory having a plurality of entries each associated with a larger data granule.

PRIORITY CLAIM

This application is a continuation of U.S. patent application Ser. No.13/921,844, entitled “COHERENT ATTACHED PROCESSOR PROXY HAVING HYBRIDDIRECTORY,” filed on Jun. 19, 2013, the disclosure of which isincorporated herein by reference in its entirety for all purposes.

BACKGROUND OF THE INVENTION

The present invention relates to data processing, and more specifically,to a coherent proxy for an attached processor.

A conventional distributed shared memory computer system, such as aserver computer system, includes multiple processing units all coupledto a system interconnect, which typically comprises one or more address,data and control buses. Coupled to the system interconnect is a systemmemory, which represents the lowest level of volatile memory in themultiprocessor computer system and generally is accessible for read andwrite access by all processing units. In order to reduce access latencyto instructions and data residing in the system memory, each processingunit is typically further supported by a respective multi-level cachehierarchy, the lower level(s) of which may be shared by one or moreprocessor cores.

Because multiple processor cores may request write access to a samememory block (e.g., cache line or sector) and because cached memoryblocks that are modified are not immediately synchronized with systemmemory, the cache hierarchies of multiprocessor computer systemstypically implement a cache coherency protocol to ensure at least aminimum required level of coherence among the various processor core's“views” of the contents of system memory. The minimum required level ofcoherence is determined by the selected memory consistency model, whichdefines rules for the apparent ordering and visibility of updates to thedistributed shared memory. In all memory consistency models in thecontinuum between weak consistency models and strong consistency models,cache coherency requires, at a minimum, that after a processing unitaccesses a copy of a memory block and subsequently accesses an updatedcopy of the memory block, the processing unit cannot again access theold (“stale”) copy of the memory block.

A cache coherency protocol typically defines a set of cache statesstored in association with cached copies of memory blocks, as well asthe events triggering transitions between the cache states and the cachestates to which transitions are made. Coherency protocols can generallybe classified as directory-based or snoop-based protocols. Indirectory-based protocols, a common central directory maintainscoherence by controlling accesses to memory blocks by the caches and byupdating or invalidating copies of the memory blocks held in the variouscaches. Snoop-based protocols, on the other hand, implement adistributed design paradigm in which each cache maintains a privatedirectory of its contents, monitors (“snoops”) the system interconnectfor memory access requests targeting memory blocks held in the cache,and responds to the memory access requests by updating its privatedirectory, and if required, by transmitting coherency message(s) and/orits copy of the memory block.

The cache states of the coherency protocol can include, for example,those of the well-known MESI (Modified, Exclusive, Shared, Invalid)protocol or a variant thereof. The MESI protocol allows a cache line ofdata to be tagged with one of four states: “M” (Modified), “E”(Exclusive), “S” (Shared), or “I” (Invalid). The Modified stateindicates that a memory block is valid only in the cache holding theModified memory block and that the memory block is not consistent withsystem memory. The Exclusive state indicates that the associated memoryblock is consistent with system memory and that the associated cache isthe only cache in the data processing system that holds the associatedmemory block. The Shared state indicates that the associated memoryblock is resident in the associated cache and possibly one or more othercaches and that all of the copies of the memory block are consistentwith system memory. Finally, the Invalid state indicates that the dataand address tag associated with a coherency granule are both invalid.

BRIEF SUMMARY

In at least one embodiment, a coherent attached processor proxy (CAPP)includes transport logic having a first interface configured to supportcommunication with a system fabric of a primary coherent system and asecond interface configured to support communication with an attachedprocessor (AP) that is external to the primary coherent system and thatincludes a cache memory that holds copies of memory blocks belonging toa coherent address space of the primary coherent system. The CAPPfurther includes one or more master machines that initiate memory accessrequests on the system fabric of the primary coherent system on behalfof the AP, one or more snoop machines that service requests snooped onthe system fabric, and a CAPP directory having a precise directoryhaving a plurality of entries each associated with a smaller datagranule and a coarse directory having a plurality of entries eachassociated with a larger data granule.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a high level block diagram of an exemplary data processingsystem in which a coherent device participates with a primary coherentsystem across a communication link through a proxy;

FIG. 2 is a more detailed block diagram of an exemplary embodiment ofthe data processing system of FIG. 1;

FIG. 3 is a more detailed block diagram of an exemplary embodiment of aprocessing unit in the data processing system of FIG. 2;

FIG. 4 is a time-space diagram of an exemplary operation on the systemfabric of the data processing system of FIG. 2;

FIG. 5 is a more detailed block diagram of an exemplary embodiment ofthe coherent attached processor proxy (CAPP) in the processing unit ofFIG. 3;

FIG. 6 is a high level logical flowchart of an exemplary process bywhich a CAPP coherently handles a memory access request received from anattached processor (AP) in accordance with one embodiment;

FIG. 7 is a high level logical flowchart of an exemplary process bywhich a CAPP coherently handles a snooped memory access request inaccordance with one embodiment;

FIG. 8 is a first time-space diagram of an exemplary processing scenarioin which an AP requests to coherently update a memory block within theprimary coherent system to which it is attached;

FIG. 9 is a second time-space diagram of an exemplary processingscenario in which an AP requests to coherently update a memory blockwithin the primary coherent system to which it is attached;

FIG. 10 is a third time-space diagram of an exemplary processingscenario in which an AP requests to coherently update a memory blockwithin the primary coherent system to which it is attached;

FIG. 11 is a more detailed view of a hybrid CAPP directory in accordancewith one embodiment;

FIG. 12 is a more detailed flowchart of an exemplary method ofdetermining the CAPP coherence state in an embodiment having a hybridCAPP directory;

FIG. 13 is a high level logical flowchart of an exemplary method bywhich a CAPP implements cache management commands of the AP in anembodiment having a hybrid CAPP directory;

FIG. 14 is a high level logical flowchart of an exemplary method bywhich a CAPP determines an partial response (Presp) for a snoopedrequest in an embodiment having a hybrid CAPP directory;

FIG. 15 is a high level logical flowchart of an exemplary method bywhich an AP manages a hybrid CAPP directory; and

FIG. 16 is a data flow diagram of an exemplary design process.

DETAILED DESCRIPTION

With reference now to the figures and with particular reference to FIG.1, there is illustrated a high level block diagram of an exemplary dataprocessing system 100 in which a coherent device participates with aprimary coherent system across a communication link through a proxy. Asshown, data processing system 100 includes a primary coherent system 102in which coherency of a distributed shared memory is maintained byimplementation of a coherency protocol, such as the well-known MESIprotocol or a variant thereof. The coherency protocol, which in variousembodiments can be directory-based or snoop-based, is characterized by abounded time frame in which a system-wide coherency response isdetermined for each memory access request.

As shown, the functionality of data processing system 100 can beexpanded by coupling an attached processor (AP) 104 to primary coherentsystem 102 by a communication link 108. AP 104 may be implemented, forexample, as a field programmable gate array (FPGA), application specificintegrated circuit (ASIC), or other general or special-purpose processoror system. In various embodiments, AP 104 may, for example, serve as aco-processor that off-loads predetermined processing tasks from primarycoherent system 102, provide low cost expansion of the general-purposeprocessing capabilities of data processing system 100, and/or provide aninterface with a heterogeneous system external to primary coherentsystem 102. In some embodiments, AP 104 may serve as a memory controllerfor system memory, an I/O device, a bus performance monitor, a busirritator (e.g., used for floor debug and system stress analysis). Insupport of these and other possible functions of AP 104, AP 104preferably includes a cache 106 that holds local copies of memory blocksin the coherent memory address space of primary coherent system 102 toenable low latency access to those memory blocks by AP 104.

In many cases, the technology utilized to implement AP 104, cache 106,and/or communication link 108 has insufficient speed, bandwidth and/orreliability to guarantee that AP 104 can participate in thedetermination of the system-wide coherency responses for memory accessrequests within the bounded time frame required by the coherencyprotocol of primary coherent system 102. Accordingly, primary coherentsystem 102 further includes at least one coherent attached processorproxy (CAPP) 110 that participates on behalf of an associated AP 104 inthe determination of the system-wide coherency responses for AP 104within a timeframe that satisfies the timing requirements of thecoherency protocol of primary coherent system 102. Although notrequired, it is preferable if CAPP 110 is programmable and can thereforebe programmed to support any of multiple different implementations of AP104.

Referring now to FIG. 2, there is depicted a more detailed block diagramof a data processing system 200 that is one of the numerous possibleembodiments of data processing system 100 of FIG. 1. Data processingsystem 200 may be implemented, for example, with one of the IBM Powerservers, a product line of International Business Machines Corporationof Armonk, N.Y.

In the depicted embodiment, data processing system 200 is a distributedshared memory multiprocessor (MP) data processing system including aplurality of processing units 202 a-202 m. Each of processing units 202a-202 m is supported by a respective one of shared system memories 204a-204 m, the contents of which may generally be accessed by any ofprocessing units 202 a-202 m. Processing units 202 a-202 m are furthercoupled for communication to a system fabric 206, which may include oneor more bused, switched and/or wireless communication links. Thecommunication on system fabric 206 includes memory access requests byprocessing units 202 requesting coherent access to various memory blockswithin various shared system memories 204 a-204 m.

As further shown in FIG. 2, one or more of processing units 204 a-204 mare further coupled to one or more communication links 210 providingexpanded connectivity. For example, processing units 202 a and 202 m arerespectively coupled to communication links 210 a-210 k and 210 p-210 v,which may be implemented, for example, with Peripheral ComponentInterconnect express (PCIe) local buses. As shown, communication links210 can be utilized to support the direct or indirect coupling ofinput/output adapters (IOAs) such as IOAs 212 a, 212 p and 212 v, whichcan be, for example, network adapters, storage device controllers,display adapters, peripheral adapters, etc. For example, IOA 212 p,which is network adapter coupled to an external data network 214, iscoupled to communication link 210 p optionally through an I/O fabric 216p, which may comprise one or more switches and/or bridges. In a similarmanner, IOA 212 v, which is a storage device controller that controlsstorage device 218, is coupled to communication link 210 v optionallythrough an I/O fabric 216 v. As discussed with reference to FIG. 1,communication links 210 can also be utilized to support the attachmentof one or more APs 104, either directly to a processing unit 202, as isthe case for AP 104 k, which is coupled to processing unit 202 a bycommunication link 210 k, or indirectly to a processing unit 202 throughan intermediate I/O fabric 216, as can be the case for AP 104 w, whichcan be coupled to processing unit 202 m through communication link 210 vand optional I/O fabric 216 v.

Data processing system 200 further includes a service processor 220 thatmanages the boot process of data processing system 200 and thereaftermonitors and reports on the performance of and error conditions detectedin data processing system 200. Service processor 220 is coupled tosystem fabric 206 and is supported by a local memory 222, which mayinclude volatile (e.g., dynamic random access memory (DRAM)) andnon-volatile memory (e.g., non-volatile random access memory (NVRAM) orstatic random access memory (SRAM)). Service processor 220 is furthercoupled to a mailbox interface 224 through which service processor 220communicates I/O operations with communication link 210 a.

Those of ordinary skill in the art will appreciate that the architectureand components of a data processing system can vary between embodiments.For example, other devices and interconnects may alternatively oradditionally be used. Accordingly, the exemplary data processing system200 given in FIG. 2 is not meant to imply architectural limitations withrespect to the claimed invention.

With reference now to FIG. 3, there is illustrated a more detailed blockdiagram of an exemplary embodiment of a processing unit 202 in dataprocessing system 200 of FIG. 2. In the depicted embodiment, eachprocessing unit 202 is preferably realized as a single integratedcircuit chip having a substrate in which semiconductor circuitry isfabricated as is known in the art.

Each processing unit 202 includes multiple processor cores 302 a-302 nfor independently processing instructions and data. Each processor core302 includes at least an instruction sequencing unit (ISU) 304 forfetching and ordering instructions for execution and one or moreexecution units 306 for executing instructions. The instructionsexecuted by execution units 306 may include, for example, fixed andfloating point arithmetic instructions, logical instructions, andinstructions that request read and write access to a memory block in thecoherent address space of data processing system 200.

The operation of each processor core 302 a-302 n is supported by amulti-level volatile memory hierarchy having at its lowest level one ormore shared system memories 204 (only one of which is shown in FIG. 3)and, at its upper levels, one or more levels of cache memory. Asdepicted, processing unit 202 includes an integrated memory controller(IMC) 324 that controls read and write access to an associated systemmemory 204 in response to requests received from processor cores 302a-302 n and operations received on system fabric 206.

In the illustrative embodiment, the cache memory hierarchy of processingunit 202 includes a store-through level one (L1) cache 308 within eachprocessor core 302 a-302 n and a store-in level two (L2) cache 310. Asshown, L2 cache 310 includes an L2 array and directory 314, masters 312and snoopers 316. Masters 312 initiate transactions on system fabric 206and access L2 array and directory 314 in response to memory access (andother) requests received from the associated processor cores 302.Snoopers 316 detect operations on system fabric 206, provide appropriateresponses, and perform any accesses to L2 array and directory 314required by the operations. Although the illustrated cache hierarchyincludes only two levels of cache, those skilled in the art willappreciate that alternative embodiments may include additional levels(L3, L4, etc.) of private or shared, on-chip or off-chip, in-line orlookaside cache, which may be fully inclusive, partially inclusive, ornon-inclusive of the contents the upper levels of cache.

As further shown in FIG. 3, processing unit 202 includes integratedinterconnect logic 320 by which processing unit 202 is coupled to systemfabric 206, as well as an instance of response logic 322, which inembodiments employing snoop-based coherency, implements a portion of adistributed coherency messaging mechanism that maintains coherency ofthe cache hierarchies of processing unit 202. Processing unit 202further includes one or more integrated I/O (input/output) controllers330 (e.g., PCI host bridges (PHBs)) supporting I/O communication via oneor more communication links 210. Processing unit 202 additionallyincludes a CAPP 110 as previously described. As shown, CAPP 110 mayoptionally include a dedicated I/O controller 332 (e.g., a PHB) by whichCAPP 110 supports communication over an external communication link 210k to which an AP 104 k is also coupled. In alternative embodiments,dedicated I/O controller 332 can be omitted, and CAPP 110 cancommunicate with AP 104 via a shared I/O controller 330. It should benoted that there may be multiple CAPPs 110 per processing unit 202and/or multiple processing units 202 having one or more CAPPs 110, witheach CAPP 110 independently programmed to support the operation andfunctionality of the attached AP 104.

Those skilled in the art will appreciate that data processing system 200can include many additional or alternative components. Because suchadditional components are not necessary for an understanding of thepresent invention, they are not illustrated in FIG. 3 or discussedfurther herein.

Referring now to FIG. 4, there is depicted a time-space diagram of anexemplary operation on the system fabric 206 of data processing system200 of FIG. 2 in accordance with one embodiment of a snoop-basedcoherence protocol. The operation begins when a master 400 (e.g., amaster 312 of an L2 cache 310, a master within an I/O controller 330 ora master in CAPP 110) issues a request 402 on system fabric 206. Request402 preferably includes at least a transaction type indicating a type ofdesired access and a resource identifier (e.g., real address) indicatinga resource to be accessed by the request. Common types of requestspreferably include those set forth below in Table I.

TABLE I Request Description READ Requests a copy of the image of amemory block for query purposes RWITM (Read- Requests a unique copy ofthe image of a memory block with the With-Intent-To- intent to update(modify) it and requires destruction of other Modify) copies, if anyBKILL Requests invalidation of all cached copies of a target memoryblock (Background Kill) and cancellation of all reservations for thetarget memory block DCLAIM (Data Requests authority to promote anexisting query-only copy of Claim) memory block to a unique copy withthe intent to update (modify) it and requires destruction of othercopies, if any DCBZ (Data Cache Requests authority to create a newunique copy of a memory Block Zero) block without regard to its presentstate and subsequently modify its contents; requires destruction ofother copies, if any CASTOUT Copies the image of a memory block from ahigher level of memory to a lower level of memory in preparation for thedestruction of the higher level copy WRITE Requests authority to createa new unique copy of a memory block without regard to its present stateand immediately copy the image of the memory block from a higher levelmemory to a lower level memory in preparation for the destruction of thehigher level copy

Further details regarding these operations and an exemplary cachecoherency protocol that facilitates efficient handling of theseoperations may be found in U.S. Pat. No. 7,389,388, which isincorporated by reference.

Request 402 is received by snoopers 404 distributed throughout dataprocessing system 200, including, for example, snoopers 316 of L2 caches310, snoopers 326 of IMCs 324, and snoopers within CAPPs 110 (see, e.g.,snoop machines (SNMs) 520 of FIG. 5). In general, with some exceptions,snoopers 316 in the same L2 cache 310 as the master 312 of request 402do not snoop request 402 (i.e., there is generally no self-snooping)because a request 402 is transmitted on system fabric 206 only if therequest 402 cannot be serviced internally by a processing unit 202.Snoopers 404 that receive and process requests 402 each provide arespective partial response (Presp) 406 representing the response of atleast that snooper 404 to request 402. A snooper 326 within an IMC 324determines the partial response 406 to provide based, for example, uponwhether the snooper 326 is responsible for the request address andwhether it has resources available to service the request. A snooper 316of an L2 cache 310 may determine its partial response 406 based on, forexample, the availability of its L2 array and directory 314, theavailability of a snoop machine instance within snooper 316 to handlethe request, and the coherence state associated with the request addressin L2 array and directory 314.

The partial responses 406 of snoopers 404 are logically combined eitherin stages or all at once by one or more instances of response logic 322to determine a systemwide coherence response to request 402, referred toherein as a combined response (Cresp) 410. In one preferred embodiment,which will be assumed hereinafter, the instance of response logic 322responsible for generating combined response 410 is located in theprocessing unit 202 containing the master 400 that issued request 402.Response logic 322 provides combined response 410 to master 400 andsnoopers 404 via system fabric 206 to indicate the response (e.g.,success, failure, retry, etc.) to request 402. If combined response 410indicates success of request 402, combined response 410 may indicate,for example, a data source for a requested memory block, a cache statein which the requested memory block is to be cached by master 400, andwhether “cleanup” operations invalidating the requested memory block inone or more caches are required.

In response to receipt of combined response 410, one or more of master400 and snoopers 404 typically perform one or more actions in order toservice request 402. These actions may include supplying data to master400, invalidating or otherwise updating the coherence state of datacached in one or more caches, performing castout operations, writingback data to a system memory 204, etc. If required by request 402, arequested or target memory block may be transmitted to or from master400 before or after the generation of combined response 410 by responselogic 322.

In the following description, the partial response 406 of a snooper 404to a request 402 and the actions performed by the snooper 404 inresponse to the request 402 and/or its combined response 410 will bedescribed with reference to whether that snooper is a Highest Point ofCoherency (HPC), a Lowest Point of Coherency (LPC), or neither withrespect to the request address specified by the request. An LPC isdefined herein as a memory device or I/O device that serves as therepository for a memory block. In the absence of a HPC for the memoryblock, the LPC holds the true image of the memory block and hasauthority to grant or deny requests to generate an additional cachedcopy of the memory block. For a typical request in the data processingsystem embodiment of FIG. 2, the LPC will be the memory controller 324for the system memory 204 holding the referenced memory block. An HPC isdefined herein as a uniquely identified device that caches a true imageof the memory block (which may or may not be consistent with thecorresponding memory block at the LPC) and has the authority to grant ordeny a request to modify the memory block. Descriptively, the HPC mayalso provide a copy of the memory block to a requestor in response to anoperation that does not modify the memory block. Thus, for a typicalrequest in the data processing system embodiment of FIG. 2, the HPC, ifany, will be an L2 cache 310 or CAPP 110. Although other indicators maybe utilized to designate an HPC for a memory block, a preferredembodiment of the present invention designates the HPC, if any, for amemory block utilizing selected cache coherency state(s), which may beheld, for example, in a cache directory.

Still referring to FIG. 4, the HPC, if any, for a memory blockreferenced in a request 402, or in the absence of an HPC, the LPC of thememory block, preferably has the responsibility of protecting thetransfer of ownership of a memory block, if necessary, in response to arequest 402. In the exemplary scenario shown in FIG. 4, a snooper 404 nat the HPC (or in the absence of an HPC, the LPC) for the memory blockspecified by the request address of request 402 protects the transfer ofownership of the requested memory block to master 400 during aprotection window 412 a that extends from the time that snooper 404 ndetermines its partial response 406 until snooper 404 n receivescombined response 410 and during a subsequent window extension 412 bextending (preferably, for a programmable time) beyond receipt bysnooper 404 n of combined response 410. During protection window 412 aand window extension 412 b, snooper 404 n protects the transfer ofownership by providing partial responses 406 to other requestsspecifying the same request address that prevent other masters fromobtaining ownership (e.g., a retry partial response) until ownership hasbeen successfully transferred to master 400. If necessary, master 400may also likewise initiate a protection window 413 to protect itsownership of the memory block requested in request 402 following receiptof combined response 410.

As will be appreciated by those skilled in the art, the snoop-basedcoherence protocol illustrated in FIG. 4 may be implemented utilizingmultiple diverse sets of coherence states. In a preferred embodiment,the cache coherence states employed within the protocol, in addition toproviding (1) an indication of whether a cache is the HPC for a memoryblock, also indicate at least (2) whether the cached copy is unique(i.e., is the only cached copy system-wide), (3) whether and when thecache can provide a copy of the memory block to a master of a memoryaccess request for the memory block, (4) whether the cached image of thememory block is consistent with the corresponding memory block at theLPC (system memory). These attributes can be expressed, for example, ina variant of the well-known MESI (Modified, Exclusive, Shared, Invalid)protocol including at least the coherence states summarized below inTable II.

TABLE II Consistent Coherence state HPC? Unique? Data Source? with LPC?M (Modified) Yes Yes Yes (before Cresp) No T (Shared-Owner) Yes UnknownYes (after Cresp) No S (Shared) No Unknown No Unknown I (Invalid) No NoNo N/a - data is invalid

In addition to the coherence states listed in Table II, the coherenceprotocol may include one or more additional transitional coherencestates that can be employed, among other things, to implement protectionwindow 412 a, window extension 412 b, and protection window 413. Forexample, the coherence protocol may include an HPC Protect state thatmaster 400 may assume in response to combined response 410 to protecttransfer of HPC status (i.e., coherence ownership) to that master 400during protection window 413. Similarly, the coherence protocol mayadditionally include a Shared Protect state that a master 400 or asnooper 404 n may assume in response to issuing or snooping a DClaimrequest, respectively, in order to implement protection window 413 orprotection window 412 a and window extension 412 b. Further, thecoherence protocol may include an Shared Protect Noted state that may beassumed to facilitate assumption of HPC status by another master 400, asdescribed further herein.

Referring now to FIG. 5, there is depicted a more detailed block diagramof an exemplary embodiment of the coherent attached processor proxy(CAPP) 110 in processing unit 202 of FIG. 3. As shown, CAPP 110 iscoupled to interconnect logic 320 to permit CAPP 110 to transmit andreceive address, control and coherency communication via system fabric206 on behalf of (i.e., as a proxy for) an AP 104 (e.g., AP 104 k) towhich it is coupled by a communication link (e.g., communication link210 k).

CAPP 110 includes snooper logic 500, master logic 502, transport logic504, and as discussed above, an optional I/O controller 332. Transportlogic 504 has two interfaces, a first by which transport logic 504manages communication over communication link 210 k as necessary tocomport with the messaging protocol employed by communication link 210 kand/or AP 104, and a second by which transport logic 504 manages datacommunication with system fabric 206. Thus, transport logic 504 maypacketize data, may apply message encapsulation/decapsulation orencryption/decryption, may compute, append and/or verify checksums,etc., as is known in the art.

Snooper logic 500 includes a decoder 510, a directory 512 of thecontents of the data array 552 of the cache 106 of the associated AP104, a snoop table 514, a dispatcher 516, and a set of snoop machines(SNMs) 520. Decoder 510 of snooper logic 500 receives memory accessrequests from system fabric 206 via interconnect logic 320 andoptionally but preferably decodes the snooped memory access requestsinto a corresponding set of internal snoop requests. The set of internalsnoop requests implemented by decoder 510 is preferably programmable(and in some embodiments dynamically reprogrammable) to decouple thedesign of CAPP 110 from that of AP 104 and to allow flexibility inmapping the memory access requests of the primary coherent system 102 tothe request set of the associated AP 104. Following decoding by decoder510, the target address specified by the memory access request isutilized to access directory 512 in order to look up the coherence stateof the target address with respect to AP 104. It should be noted thatthe coherence state indicated by directory 512 may not match orcorrespond to that indicated by directory 550 of cache 106 in AP 104.Nevertheless, the use of the coherence state information in directory512 in CAPP 110 rather than directory 550 in AP 104 enables the boundedtime frame in which a system-wide coherency response is to be determinedfor each memory access request in primary coherent system 102 to be met,regardless of whether communication link 210 and/or AP 104 have lowerspeed or reliability than other components of data processing system(e.g., CAPP 110).

The coherence state specified by directory 512 and the internal requestdetermined by decoder 510 are then utilized by snoop table 514 todetermine an appropriate partial response (Presp) to the snooped memoryaccess request. In response to at least the internal snoop requestdetermined by decoder 510, coherence state output by directory 512 andPresp output by snoop table 514, dispatcher 516 determines whether ornot any further action is or may possibly be required in response to thememory access request (e.g., update of directory 512, sourcing thetarget cache line to the requester, etc.), and if so, dispatches a snoopmachine 520 to manage performance of that action.

Master logic 502 optionally but preferably includes a master table 530that maps memory access and other requests originated by AP 104 k andreceived by CAPP 110 to internal master requests. As with the mappingperformed by decoder 510 of snooper logic 500, the mapping performed bymaster table 530 decouples the design of CAPP 110 and AP 104 and enablesCAPP 110 to programmably support a wide variety of diverse APs 104. Inat least some embodiments, master table 530 supports dynamicreprogramming. Master logic 502 further includes a set of mastermachines (MMs) 532 that services internal master requests output bymaster table 530. In a typical case, a master machine 532 allocated toservice an internal master request determines and manages an action tobe performed to service the internal request (e.g., initiating adirectory update and/or memory access request on system fabric 206)based at least in part on the coherence state indicated for the targetaddress of the master request by directory 512. Data transfers to andfrom AP 104 via CAPP 110 in response to the operation of snooper logic500 and master logic 502 are tracked via operation tags allocated fromtag pool 540.

As further indicated in FIG. 5, master logic 502 includes a combinedresponse (Cresp) table 534. In response to receipt of a combinedresponse representing the systemwide coherence response to a request,Cresp table 534 translates the combined response received from systemfabric 206 into an internal Cresp message and distributes the internalCresp message to master machines 532 and snoop machines 520. Again, thetranslation of combined responses to internal Cresp messages by Cresptable 534 decouples the design of AP 104 from that of primary coherentsystem 102 and enables the interface provided by CAPP 110 to beprogrammable and thus support a variety of diverse APs 104.

As noted above, several data structures (e.g., decoder 510, snoop table514, master table 530 and Cresp table 534) within CAPP 110 arepreferably programmable, and in some embodiments, dynamicallyprogrammable. In one implementation, a control processor (e.g., serviceprocessor 220 or any of processing units 202 running supervisory code(e.g., hypervisor)) dynamically updates the data structures by firstinstructing AP 104 to invalidate its directory 550 and quiesce. Thecontrol processor then updates one or more of the data structures withinCAPP 110. In response to completion of the updates, the controlprocessor instructs AP 104 to resume normal processing. It should alsobe noted that the configurations of master table 530 and snoop table 514affects not only the mapping (translation) of incoming AP requests andsnooped requests, respectively, but also the behavior of MMs 532 andSNMs 520. That is, the behavior of MMs 532 in response to AP requestsand the messages transmitted on system fabric 206 and to AP 104 are alsopreferably determined by the configuration of master table 530.Similarly, the behavior of SNMs 520 in response to snooped requests andthe messages transmitted on system fabric 206 and to AP 104 arepreferably determined by the configuration of snoop table 514. Thus, thebehaviors and messages of MMs 532 and SNMs 520 can be selectivelychanged by appropriate reprogramming of master table 530 and snoop table514.

Referring now to FIG. 6, there is depicted a high level logicalflowchart of an exemplary process by which a CAPP 110 coherently handlesa memory access request received from an AP 104 in accordance with oneembodiment. As with the other logical flowcharts presented herein, itshould be appreciated that steps are presented in a logical rather thanstrictly chronological order and at least some of the illustrated stepsmay be performed concurrently or in a different order than thatillustrated.

The process shown in FIG. 6 begins at block 600 and then proceeds toblock 602, which illustrates an AP 104 generating a target addresswithin the coherent address space of primary coherent system 102. Thetarget address identifies a coherent storage location to which some typeof access is desired, for example, an access to obtain a query-only copyof a cache line, update or invalidate contents of a storage locationidentified by the target address, writeback a cache line to systemmemory 204, invalidate a page table entry utilized to perform addresstranslation, etc. AP 104 additionally performs a lookup of the coherencestate of the target address in AP directory 550 (block 604). AP 104 thentransmits to CAPP 110 a memory access request specifying the desiredaccess, together with the coherence state read from AP directory 550 andany associated data (block 606).

The coherence state transmitted with the AP memory access request isreferred to herein as the “expected state,” in that in many cases, thetype of memory access request selected by AP 104 is predicated on thecoherence state indicated by AP directory 550. In a preferredembodiment, AP 104 transmits the memory access request to CAPP 110 evenin cases in which the expected state is or corresponds to an HPC statethat, if held in an L2 cache 310, would permit the associated processorcore 302 to unilaterally access the storage location identified by thetarget address prior to receipt of a combined response. This is the casebecause the coherence state determination made by AP 104 is onlypreliminary, with the final coherence state determination being made byCAPP 110 as described below.

In response to receipt of the AP memory access request, master table 530of master logic 502 optionally translates the AP memory access requestinto an internal master request (e.g., one of the set of requests withinthe communication protocol specified for system fabric 206 (block 610).In a typical embodiment, the translation includes mapping thetransaction type (ttype) indicated by the AP memory access request to attype utilized on system fabric 206. In addition, CAPP 110 determines acoherence state for the target address specified by the memory accessrequest with respect to AP 104 (block 616). In a preferred embodiment,the coherence state is determined from multiple sources of coherenceinformation according to a predetermined prioritization of the sources,which include (in order of increasing priority): directory 512, MMs 532and SNMs 520. Thus, if CAPP 110 determines at block 616 that one of SNMs520 is processing a snooped memory access request that collides with thetarget address, the coherence state indicated by that SNM 520 isdeterminative. Similarly, if CAPP 110 determines at block 616 that noSNMs 520 is active processing a request that collides with the targetaddress, but the target address of the AP memory access request collideswith the target address of a master request being processed by one ofMMs 532, the coherence state indicated by that MM 532 is determinative.If the request address does not collide with an active SNM 520 or MM532, the coherence state indicated by CAPP directory 512 isdeterminative.

At block 620, master logic 502 determines whether or not the expectedstate communicated with the AP memory access request matches thecoherence state determined by CAPP 110 at block 616. If so, master logic502 allocates an MM 532 to service the AP memory access request in anActive state in which the MM 532 begins its activities to service the APmemory access request (block 621). At block 622, the MM 532 allocated toservice the AP memory access request determines whether or not servicingthe AP memory access request includes initiating a memory access requeston system fabric 206. If not, the process passes through page connectorB to block 650, which is described further below.

If, however, MM 532 determines at block 622 that servicing the AP memoryaccess request includes initiating a memory access request on systemfabric 206, the MM 532 initiates the required memory access request onsystem fabric 206 on behalf of AP 104 (block 624). Within a boundedtime, master logic 502 receives the combined response (Cresp) for therequest (block 626), which Cresp table 534 optionally translates to aninternal Cresp message (block 628) and distributes to the MM 532 thatinitiated the memory access request. As indicated at block 630, if thecombined response indicates Retry, meaning that at least one necessaryparticipant could not service the request (e.g., was not available toservice the request or was already processing another request having anaddress collision with the target address), the process returns to block616, which has been described. Again determining the coherence state ofCAPP 110 with respect to the target address at block 616 after a Retrycombined response to the memory access request allows MM 532 to detectand respond to any changes to the coherence state occurred due todispatch of a SNM 520 to service a conflicting request for the targetaddress while the MM 532 was working on the memory access request. Forexample, if the dispatch of a SNM 520 leads to a coherence statemismatch, MM 532 may fail the requested memory access request, asdiscussed below with reference to block 644, or may defer servicing thememory access request and enter a Parked state, as discussed below withreference to block 642. If, on the other hand, the combined responsereceived at block 630 indicates that the request succeeded, the MM 532that initiated request performs any data handling actions, cleanupactions, and/or directory update actions required to complete servicingthe request (block 632). The data handling actions can include, forexample, MM 532 receiving requested data and forwarding the data to AP104 or transmitting data from AP 104 on system fabric 206. The cleanupactions can include, for example, MM 532 issuing one or more killrequests on system fabric 206 to invalidate one or more copies of acache line identified by the target address cached elsewhere within dataprocessing system 200. The directory update actions include making anycoherence update required by the request to both CAPP directory 512 andAP directory 550. Thereafter, the process shown in FIG. 6 ends at block634.

Returning to block 620, in response to a determination that the expectedcoherence state specified with the AP memory access request does notmatch the coherence state determined by CAPP 110, the process proceedsto blocks 640-644. In one embodiment in which optional blocks 640-642are omitted, the MM 532 allocated to the service the request transmits aFailure message to AP 104. In addition to the Failure message, MM 532optionally further indicates, with the Failure message or in a separatedirectory update message, the coherence state for the target addressdetermined by CAPP 110, thus enabling AP 104 to update its AP directory550 and to subsequently initiate an appropriate AP memory access requesttogether with the appropriate expected state. Thereafter, the processshown in FIG. 6 ends at block 634. In this embodiment, AP 104 mayrequire numerous requests to access the target memory block if thetarget memory block is highly contended by snoopers in primary coherentsystem 102. Accordingly, in an alternative embodiment including blocks640-642, master logic 502 is able to increase its priority for thetarget memory block with respect to snoopers in primary coherent system102 by entering a Parked state. In particular, master logic 502determines at block 640 whether or not the coherence state mismatchdetected at block 620 is due to one of SNMs 520 being active servicing asnooped memory access request that has an address collision with thetarget address. If not, the process proceeds to block 644, which hasbeen described.

If, however, master logic 502 determines at block 640 that the coherencestate mismatch detected at block 620 is due to one of SNMs 520 beingactive servicing a snooped memory access request that has an addresscollision with the target address, the process passes to block 642.Block 642 depicts master logic 502 allocating an MM 532 in Parked state.In the Parked state, MM 532 does not actively begin to service the APmemory access request and does not inhibit the SNM 520 that is active onthe target address from completing its processing of the snooped memoryaccess request, but does (in one embodiment) inhibit any other of theSNMs 520 and MMs 532 in the same CAPP 110 from transitioning to anactive state to service a request specifying an address that collideswith the target address of the AP memory access request. The allocatedMM 532 remains in the Parked state until the SNM 520 that is activeservicing the conflicting snooped memory access request transitions toan Idle state, and in response to this transition, itself transitionsfrom the Parked state to an Active state. The process then passes toblock 616 and following blocks, which have been described. Returning toblock 616 ensures that the SNM 520 that was active on the target addressdid not change the CAPP coherence state from the expected state. (Itshould be noted, however, that the active SNM 520 may update thecoherence state in CAPP directory 512 prior to its retirement, and theretirement of the SNM 520 itself will likely change the composite CAPPcoherence state determined at block 616.)

In at least some embodiments, the allocation of an MM 532 in the Parkedstate does not absolutely inhibit any other of the SNMs 520 and MMs 532in the same CAPP 110 from transitioning to an active state. Instead, theeffects of a MM 532 in the Parked state (and/or an active state) on thedispatch of other SNMs 520 and MMs 532 to service selected types ofconflicting requests can be varied, for example, via program control(i.e., via execution of an appropriate CAPP control instruction by oneof processor cores 302 or AP 104) of the composite coherence statedetermination described above with reference to block 616. For example,to eliminate unnecessary traffic on system fabric 206, dispatcher 516can be permitted by programmable control to dispatch a SNM 520 in anactive state to service a snooped BKill request that invalidates thetarget memory block of a conflicting request being handled by a MM 532in the Parked state or an active state. In cases in which anothermachine is dispatched to service a conflicting request while a MM 532 isin the Parked state, the MM 532 in the Parked state re-enters the Parkedstate when the process of FIG. 6 proceeds along the path from block 642to blocks 616, 620, 640 and returns to block 642. Master logic 502further preferably implements a counter to bound the number of times aMM 532 is forced to re-enter the Parked state in this manner for asingle AP request. When a threshold value of the counter is reached, thedispatch of other SNMs 520 and MMs 532 to service conflicting requestsis then inhibited to permit the MM 532 to exit the Parked state andmanage servicing of its AP request.

Referring now to block 650, in response to determining the servicing theAP memory access request does not require issuing a memory accessrequest on system fabric 206, MM 532 updates the CAPP directory 512 asindicated by the AP memory access request. MM 532 then transmits aSuccess message to AP 104 to confirm the update to CAPP directory 512.The process thereafter terminates at block 632.

With reference now to FIG. 7, there is illustrated a high level logicalflowchart of an exemplary process by which a CAPP 110 coherently handlesa snooped memory access request in accordance with one embodiment. Theillustrated process begins at block 700 and then proceeds to block 702,which depicts snooper logic 500 of CAPP 110 receiving a memory accessrequest on system fabric 206 via interconnect logic 320. At block 704,decoder 510 decodes the snooped memory access request to determine thetype of the request. In addition, at block 706, CAPP 110 determines acoherence state for the address referenced by the snooped memory accessrequest, for example, utilizing the methodology previously describedwith reference to block 616.

Based on the decoded type of the snooped memory access request asdetermined at block 704 and the coherence state for the referencedaddress as determined at block 706, snoop table 514 determines andtransmits on system fabric 206 a partial response representing thecoherence response of AP 104 to the snooped memory access request (block710).

Referring now to block 712, dispatcher 516 of snooper logic 500determines based on the partial response determined at block 710 and thedecoded memory access request whether or not further action by CAPP 110may be required to service the snooped memory access request. Ingeneral, if the coherence state determined at block 706 is Invalid,meaning that AP cache 106 does not hold a valid copy of the memory blockidentified by the referenced memory address, no further action on thepart of CAPP 110 or AP 104 is required to service the snooped memoryaccess request. If the coherence state determined at block 706 is otherthan Invalid, at least some additional action may be required on thepart of CAPP 110 and/or AP 104 to service the snooped memory accessrequest.

In response to a negative determination at block 712, the processdepicted in FIG. 7 ends at block 730. If, however, dispatcher 516determines at block 712 that further action by CAPP 110 and/or AP 104may be required to service the snooped memory access request, dispatcher516 dispatches one of SNMs 520 to manage any action required to servicethe snooped memory access request (block 714). At block 716, thedispatched SNM 520 determines whether the action required to service thesnooped memory access request can be determined without the combinedresponse representing the systemwide coherence response to the memoryaccess request or whether the combined response is required to determinethe action required to appropriately service the snooped memory accessrequest. In response to a determination at block 716 that the combinedresponse is not required to determine the action to perform to servicethe snooped memory access request, the dispatched SNM 520 managesperformance of any data handling and/or directory update actionsrequired by the decoded memory access request and coherence state toservice the memory access request (block 718). Thereafter, the processillustrated in FIG. 7 ends at block 730.

In response to a determination at block 716 that the combined responseis required to determine the action to be performed to service thesnooped memory access request, the dispatched SNM 520 waits for thecombined response, as shown at block 720. In response to receiving thecombined response, Cresp table 534 optionally translates the combinedresponse into an internal Cresp message employed by CAPP 110 (block722). The dispatched SNM 520 then manages performance of any datahandling and/or directory update actions required by the combinedresponse to service the memory access request (block 724). Thereafter,the process illustrated in FIG. 7 ends at block 730.

Referring now to FIG. 8, there is depicted a first time-space diagram ofan exemplary processing scenario in which an AP 104 requests tocoherently update a memory block within the primary coherent system 102to which it is attached. For purposes of illustration, the exemplaryprocessing scenario given in FIG. 8 and other similar figures will bedescribed with reference to the illustrative hardware embodiments givenin FIGS. 2-3 and 5.

As the exemplary processing scenario begins, an AP 104 processes acommand (e.g., a software or firmware instruction executed within AP104) specifying an update to a memory block identified by a targetaddress within the coherent address space of primary coherent system102. In response to the command, AP 104 allocates one of its idle finitestate machines (FSMs) to manage performance of the command and performsa lookup of the target address in AP directory 550, as indicated byarrow 800. The AP FSM transitions from an idle state (indicated by “X”)to an Update Active state and, based on a determination that the targetaddress has an Invalid coherence state with respect to AP directory 550,transmits to CAPP 110 an update request with an expected state ofInvalid, as shown at reference numeral 802.

In response to receipt from AP 104 of the update request, CAPP 110translates the AP update request into a RWITM request, which asindicated in Table I, is one of the set of requests within thecommunication protocol specified for system fabric 206. In addition,CAPP 110 determines a coherence state for the target address specifiedby the memory access request. Because in this case, the target addressof the RWITM request does not collide with an address that an MM 532 orSNM 520 is currently processing, the coherence state of the targetaddress for CAPP 110 is determined by CAPP directory 512, which returnsInvalid.

The previously idle MM 532 allocated to service the RWITM request, inresponse to determining a coherence state match between the expectedstate and the coherence state determined by CAPP 110, transitions to aValid state and initiates the RWITM request on system fabric 206 asshown at reference numeral 806. The RWITM request requests a copy of thetarget memory block and further requests invalidation of all othercached copies of the memory block (to permit AP 104 to modify the memoryblock). Within a bounded time, MM 532 receives a combined responseindicating success of the RWITM request, as indicated at referencenumeral 808. MM 532 also receives a copy of the requested memory block,possibly prior to, concurrently with, or after the combined response.

In response to receiving the combined response indicating success of theRWITM request, MM 532 transitions to the HPC Protect state, thusinitiating a protection window 413 for the target address. In addition,as indicated by arrow 810, MM 532 updates the coherence state for thetarget address in CAPP directory 512 to Modified. In addition, asindicated by arrow 812, MM 532 transmits the copy of the requestedmemory block and a Complete message to AP 104. Thereafter, MM 532returns to the Idle state. In response to receipt of the requestedmemory block and Complete message, the AP FSM directs the requestedupdate to the target memory block, storage of the updated target memoryblock in array 552, and update of the coherence state for the targetaddress in AP directory 550 to Modified. The updates to AP cache 106 areperformed asynchronously to the update to CAPP directory 512, and due tothe possibly unreliable connection provided by communication link 210,may require CAPP 110 to retransmit the Complete message one or moretimes. Thereafter, the AP FSM returns to the Idle state.

It can also be appreciated by reference to FIG. 8 that (depending on thepresence or absence of other colliding requests) the processing of aread request of AP 104 could be handled similarly to the illustratedprocessing scenario, with the following exceptions: the AP FSM wouldassume the Read Active state rather than the Update Active state, MM 532would assume the Shared Protect state following receipt of the combinedresponse indicated by arrow 808 rather than the HPC Protect state, andCAPP directory 512 and AP directory 550 would be updated to the Sharedstate rather than the Modified State.

With reference now to FIG. 9, there is depicted a second time-spacediagram of an exemplary processing scenario in which an AP 104 requeststo coherently update a memory block within the primary coherent system102 to which it is attached.

As the exemplary processing scenario begins, an AP 104 processes acommand (e.g., a software or firmware instruction executed within AP104) specifying an update to a memory block identified by a targetaddress within the coherent address space of primary coherent system102. In response to the command, AP 104 allocates one of its idle finitestate machines (FSMs) to manage performance of the command and performsa lookup of the target address in AP directory 550, as indicated byarrow 900. The AP FSM transitions from an Idle state (indicated by “X”)to an Update Active state and, based on a determination that the targetaddress has an Shared-Owner (T) coherence state with respect to APdirectory 550, transmits to CAPP 110 an update request with an expectedstate of T, as shown at reference numeral 902.

In response to receipt from AP 104 of the update request, CAPP 110translates the update request to a BKill request. As described abovewith reference to Table I, the BKill request requests invalidation ofall other cached copies of the memory block to permit AP 104 to modifyits existing HPC copy of the target memory block. CAPP 110 additionallydetermines a coherence state for the target address specified by theupdate request with respect to CAPP 110, as shown at reference numeral904. Because in this case, the target address of the update requestcollides with an address that a SNM 520 is currently processing, thestate of that SNM 520 is determinative, meaning that CAPP 110 determinesan HPC Protect state. Thus, the coherence state determined by CAPP 110does not match the expected state. In embodiments in which the optionalfunctionality described above with reference to blocks 640-642 of FIG. 6is not implemented, CAPP 110 would respond to the update request bytransmitting a Failure message to AP 104. However, in the illustratedcase in which the optional functionality described above with referenceto blocks 640-642 of FIG. 6 is implemented, CAPP 110 allocates an idleMM 532 to service the BKill request in the Parked state, as indicated byarrow 906. As noted above, the Parked state of the MM 532 inhibits anyother SNM 520 from transitioning to an active state to service a snoopedmemory access request for the target address.

In response to the SNM 520 that is active working on the conflictingaddress transitioning to the Idle state without modifying the matching Tcoherence state in CAPP directory 512 (e.g., as would be the case if thesnooped memory access request is a Read request), the MM 532 verifiesthat the coherence state determined for CAPP 110 (which is the T staterecorded in CAPP directory 512 in the absence of a SNM 520 or MM 532active on a conflicting address) matches the expected state, asdiscussed previously with reference to block 616 of FIG. 6. In responseto verifying that the coherence state of CAPP directory 110 matches theexpected state, the MM 532 allocated to service the BKill requesttransitions to the HPC Protect state (thus initiating a protectionwindow 413 for the target address) and initiates the BKill request onsystem fabric 206 as shown at reference numeral 910. In other scenarios(not illustrated) in which SNM 520 modifies the coherence state in CAPPdirectory 512 (e.g., as would be the case if the snooped memory accessrequest is a RWITM request), MM 532 instead returns a failure message toAP 104 and returns to the Idle state.

Returning to the scenario shown in FIG. 9, in response to the BKillrequest, MM 532 receives a combined response indicating success of theBKill request, as indicated at reference numeral 912. In response toreceiving the combined response indicating success of the BKill request,MM 532 updates the coherence state for the target address in CAPPdirectory 512 to Modified. In addition, as indicated by arrow 914, MM532 transmits a Complete message to AP 104. Thereafter, MM 532 returnsto the Idle state. In response to receipt of the Complete message, theAP FSM directs the update of the coherence state for the target addressin AP directory 550 from T to Modified and the update of thecorresponding cache line in AP array 552. Thereafter, the AP FSM returnsto the Idle state.

Referring now to FIG. 10, there is depicted a third time-space diagramof an exemplary processing scenario in which an AP 104 requests tocoherently update a memory block within the primary coherent system 102to which it is attached.

As the exemplary processing scenario shown in FIG. 10 begins, an AP 104processes a command (e.g., a software or firmware instruction executedwithin AP 104) specifying an update to a memory block identified by atarget address within the coherent address space of primary coherentsystem 102. In response to the command, AP 104 allocates one of its idlefinite state machines (FSMs) to manage performance of the command andperforms a lookup of the target address in AP directory 550, asindicated by arrow 1000. The AP FSM transitions from an Idle state(indicated by “X”) to an Update Active state and, based on adetermination that the target address has an Shared (S) coherence statewith respect to AP directory 550, transmits to CAPP 110 an updaterequest with an expected state of S, as shown at reference numeral 1002.

In response to receipt from AP 104 of the update request, CAPP 110translates the update request to a DClaim request. As described abovewith reference to Table I, the DClaim request requests invalidation ofall other cached copies of the target memory block to permit AP 104 tomodify its existing Shared copy of the target memory block. CAPP 110additionally determines a coherence state for the target addressspecified by the update request with respect to CAPP 110, as shown atreference numeral 1004. Because in this case, the target address of theupdate request collides with an address of a snooped DClaim request thata SNM 520 is currently processing, the state of that SNM 520 isdeterminative, meaning that CAPP 110 determines the Shared Protect (SP)state. Thus, the coherence state determined by CAPP 110 does not matchthe expected state of Shared (see, e.g., block 620 of FIG. 6).Consequently, CAPP 110 allocates an idle MM 532 to the DClaim request inthe Parked (P) state, as illustrated by arrow 1006 and as previouslydescribed with reference to block 642 of FIG. 6.

In response to the snooped DClaim request, the SNM 520 that is activeworking on the snooped DClaim request updates the coherence state of thetarget address in CAPP directory 512 to the Shared Protect Noted state,as indicated by arrow 1010, and additionally transmits a Kill message toAP 104 to cause the coherence state in AP directory 550 to be updated tothe Invalid state, as indicated by arrow 1012. As shown in FIG. 10, theSNM 520 thereafter returns to the Idle state.

In response to the SNM 520 returning to the Invalid state, the MM 532allocated to the DClaim request transitions from the Parked state to anactive state and again determines the coherence state of the targetmemory address with respect to CAPP 110, as described above withreference to block 616 of FIG. 6. Because the Parked state inhibits thedispatch of any other SNM 520 to service a conflicting address, thecoherence state specified by CAPP directory 512 (i.e., Shared ProtectNoted) is determinative of the coherence state of the target memoryaddress with respect to CAPP 110. In response to detecting a mismatch ofthe coherence state in CAPP directory 512 (Shared Protect Noted) withthe expected state (Shared), the MM 532 provides a Failure message to AP104 to indicate failure of the DClaim request of AP 104, as indicated byarrow 1014.

Due to the potential unreliability of communication link 210, theinvalidation in AP directory 550 initiated by SNM 520 is preferablyconfirmed by receipt of MM 532 of a full handshake from AP 104 asindicated by arrow 1018. If MM 532 does not receive a handshake from AP104 confirming invalidation of the target memory address in AP directory550 within a predetermined time period, MM 532 preferably retries a Killmessage until the handshake is returned by AP 104 or a failure thresholdis reached. In response to receipt of the handshake from AP 104, the MM532 allocated to the DClaim request returns to the Idle state.

As will be appreciated, in an alternative embodiment, CAPP 110 caninstead accommodate for the possible unreliability of communication link210 by leaving the SNM 520 allocated to service the conflicting DClaimrequest in the Shared Protect state until the SNM 520 receives thehandshake from AP 104. However, this alternative embodiment consumesmore resources in that it requires both the SNM 520 and MM 532 to remainactive for longer periods of time, thus reducing the availability ofresources to service other memory access requests received from AP 104or snooped on system fabric 206.

The AP FSM, in response to receiving Kill message 1012, transitions fromthe Update Active state to a Kill Active state, reflecting a need toinvalidate the target memory block in CAPP directory 512. Accordingly,the AP FSM performs a lookup in AP directory 550 (as indicated by arrow1020) transmits a Kill request 1022 to CAPP 110 specifying the sametarget memory address as its earlier update request and indicating anexpected coherence state of Shared Protect Noted (which the AP FSMreceived in Kill message 1012). In response to the Kill request, masterlogic 502 again determines the coherence state of the target memoryaddress with respect to CAPP 110 as described above with respect toblock 616 of FIG. 6, and as indicated in FIG. 10 by arrow 1024. Inresponse, to determining that the coherence state of the target memoryaddress with respect to CAPP 110 (i.e., the Shared Protect Noted stateindicated by CAPP directory 512) matches the expected state indicated byAP 104, master logic 502 allocates a MM 532 (which could be the same MM532 or a different MM 532) in an Active (A) state to service the AP Killrequest, as illustrated by arrow 1026 and described above with referenceto block 621 of FIG. 6. Because the Kill request does not require amemory access request to be issued on system fabric 206, the MM 532updates the CAPP directory 512 as indicated by the AP memory accessrequest, as described above with reference to block 650 of FIG. 6, inthis case by invalidating the target memory address in CAPP directory512. This update to CAPP directory 512 is illustrated in FIG. 10 byarrow 1028. On completion of the update to CAPP directory 512, MM 532also transmits a Success message to AP 104 to confirm the update to CAPPdirectory 512, as indicated in FIG. 10 by arrow 1030 and as describedabove with respect to block 652 of FIG. 6.

After the scenario illustrated in FIG. 10, the processing scenarioillustrated in FIG. 8 can be performed in order to allow AP 104 toupdate the target memory block of primary coherent system 102.

One common computational model in multiprocessor data processingsystems, such as data processing systems 100 and 200, is aproducer-consumer model in which one or more threads of executionproduce a data set and one or more other threads consume the data set.Assuming proper software synchronization of the activity of the variousthreads, for example, utilizing control blocks, interrupts, locks,messaging or other synchronization constructs, a thread of execution ina producer-consumer model should experience little or no contention fromother threads for cachelines within the data set on which it is working.In at least some use scenarios, one or more APs 104 can be employed asproducers and/or consumers of the data set to perform computationalfunctions such as encryption or decryption, matrix transformations,textual translation, etc.

In such use scenarios, it would be advantageous if the CAPP 110participating in coherent communication in primary coherent system 102on behalf on the AP 104 could protect the data set or particular regionsthereof from conflicting accesses (e.g., by other APs 104 or processingunits 202) while the AP 104 is working on the data set. With asnoop-based coherence protocol, protecting the data set entails trackingthe addresses of the data structure in CAPP directory 512 and providingRetry partial responses to conflicting accesses. However, because thedata set on which an AP 104 is working can be large (even if the datastructure containing the data set is sparsely populated and the data setis comparatively small), it can be impractical from a cost andperformance standpoint to grow CAPP directory 512 to a sufficient sizeto track the entire data structure if each directory entry is utilizedto track a small coherence granule (e.g., a single cacheline containing128 bytes of data). However, it is similarly impractical from aperformance standpoint for each directory entry in CAPP directory 512simply to track large coherence granules (e.g., memory pages) becausethe amount of coherency communication overhead (e.g., invalidations andretries) required to obtain authority to update the coherence granules.Consequently, in at least one embodiment, CAPP directory 512 ispreferably implemented with a hybrid coarse/precise structure providingmultiple (e.g., two) levels of directory for the contents of a singlecache array (i.e., AP array 552).

With reference now to FIG. 11, there is illustrated a more detailed viewof a hybrid CAPP directory 512 in accordance with one embodiment. In thedepicted embodiment, CAPP directory 512 includes a coarse directory 1100and a precise directory 1102. In the depicted example, coarse directory1100 is a four way set-associative directory including way 0 1110 a, way1 1110 b, way 2 1110 c, and way 3 1110 d. In one example, each of ways1110 a-1110 d may have a capacity of 256 entries, each having twosectors. Of course, other embodiments may have more or fewer ways,entries, and/or sectors. When accessed by the target address of a memoryaccess request, an index field of the target address is utilized toindex into each of ways 1110 a-1110 d and to read out the contents therelevant entry. A series of multiplexers 1112 receives the directoryentries read out from ways 1110 a-1110 d and selects one of the sectorsof the entries based on a sector select field from the target address(which in the illustrated example of two sectors can include a singlebit). A series of comparators 1114 compares the address tags recorded inthe sectors selected by multiplexers 1112 with an address tag field ofthe target address to make a hit/miss determination for the targetaddress in coarse directory 1100.

As further depicted in FIG. 11, the depicted embodiment of precisedirectory 1102 is an eight way set-associative directory including ways0-7, each including two ranks 0-1. Thus, in this embodiment, precisedirectory 1102 includes sixteen directory arrays, which are identifiedin rank 0 by reference numerals 1122 a 0-1122 h 0 and are identified inrank 1 by reference numerals 1122 a 1-1122 h 1. In one example, each ofthe directory arrays may have a capacity of 256 entries. Of course,other embodiments may have more or fewer ways, entries and/or ranks.When accessed by a target address of a memory access request, an indexfield of the target address is utilized to index into each of directoryarrays 1122 a 0-1122 h 0 and 1122 a 1-1122 h 1 to read out the contentsthe relevant entry. A series of multiplexers 1124 receives the directoryentries read out from the directory arrays and selects the entries ofone of the ranks based on a rank select field from the target address(which in the illustrated example of two ranks can include a singlebit). A series of comparators 1126 compares the address tags recorded inthe entries selected by multiplexers 1124 with an address tag field ofthe target address to make a hit/miss determination for the targetaddress in precise directory 1102.

It should further be understood that in some embodiments, directorycontention in CAPP directory 512 can be reduced by implementing multiplecoarse directories 1100 and multiple precise directories 1102, forexample, a coarse directory 1100 and precise directory 1102 for evenrequest addresses and a coarse directory 1100 and precise directory 1102for odd request addresses. Directory contention can alternatively oradditionally further be reduced by implementing each coarse directory1100 and precise directory 1102 as a dual ported directory, withseparate ports for read and write accesses. Further, in someembodiments, CAPP directory 512 includes or is associated with aconfiguration register 1130 having a plurality of settings that can beset by hardware and/or software to determine the sizes andconfigurations of coarse directory 1100 and precise directory 1102. Forexample, in one embodiment, a precise directory 1102 having eight ways,two ranks and 256 entries per directory array can be configured byappropriate settings of configuration register 1130 to have a maximumaddressable capacity of 1 MB, 512 kB, or 256 kB. Similarly, in oneembodiment, a coarse directory 1100 having four ways and 256 entries perway can be configured with either (1) two 4 kB sectors per entry, whichyields a 2 MB addressable capacity per way and 8 MB total addressablecapacity, or (2) four 64 kB sectors per entry, which yields 64 MBaddressable capacity per way and 256 MB total addressable capacity.

In a preferred embodiment, each CAPP directory 512 and its constituentcoarse directory 1100 and precise directory 1102 is preferablyindependently configured and controlled by the associated AP 104. Thus,the AP 104 determines the configurations of coarse directory 1100 andprecise directory 1102 and further controls which of coarse directory1100 and precise directory 1102 will be employed to track each cachelineof interest to AP 104 (whether or not such cachelines are held in array552 of AP cache 106). In various scenarios, AP 104 can specify that anentry for a cacheline is held only in coarse directory 1100 (e.g., in anentry corresponding to numerous cachelines), is held only in precisedirectory 1102 (e.g., in an entry corresponding to only a singlecacheline), or is held in both coarse directory 1100 and precisedirectory 1102. In at least some embodiments, an AP 104 can specifywhich of directories 1100, 1102 is/are to track a given cacheline (andcan change which directory or directories track a given cacheline)utilizing explicit special-purpose directory write commands directed tothe associated CAPP 110 or in one or more fields of AP requests (e.g.,read, RWITM, DClaim, etc.) issued by the AP 104 to its associated CAPP110.

With proper management, contention for cachelines of interest to an AP104 that have an associated entry in coarse directory 1100 should berelatively low. However, contention for such cachelines may occasionallyoccur. To avoid contention for a few cachelines from unnecessarilyinvalidating an entry in coarse directory 1100 representing numerouscachelines, AP 104 preferably implements a directory management policythat permits entries in coarse directory 1100 to be “holey,” that is, torepresent with a data-valid coherence state a block of multiplecontiguous cache lines, not all of which are valid in AP cache 550. Thisdirectory management policy also enables AP 104 to establish, in coarsedirectory 1100, one or more entries corresponding to a working data setprior to AP 104 retrieving and/or producing the corresponding cachelinesof data. As noted further below, entries in coarse directory 1100,whether “holey” or not, preferably represent the correspondingcollection of multiple contiguous cachelines with a single coherencestate corresponding to the highest coherence state of any of theassociated cachelines (e.g., M, T, S and I in descending order in theexemplary set of coherence states given in Table II).

Referring now to FIG. 12, there is depicted a more detailed flowchart ofan exemplary method of determining the CAPP coherence state in anembodiment having a hybrid CAPP directory 512 including a coarsedirectory 1100 and a precise directory 1102. The illustrated process canbe performed, for example, at block 616 of FIG. 6 and at block 706 ofFIG. 7.

The process of FIG. 12 begins at block 1200 and then proceeds to blocks1202-1208, which illustrate CAPP 110 determining whether or not a targetaddress (i.e., the address specified by an AP request or a snoopedrequest) hits one of SNMs 520, MMs 532, precise directory 1102 andcoarse directory 1100. If the target address does not hit any of SNMs520, MMs 532, precise directory 1102 and coarse directory 1100, thenCAPP 110 determines that the CAPP coherence state for the target addressis invalid (block 1210). The process of FIG. 12 then terminates at block1220.

If, on the other hand, the target address hits one or more of SNMs 520,MMs 532, precise directory 1102 and coarse directory 1100, CAPP 110applies a prioritization to the results of the lookup of the targetaddress. For example, if CAPP 110 determines at block 1202 that thetarget address hits one of SNMs 520, then CAPP 110 utilizes, as the CAPPcoherence state, the coherence state indicated by the SNM 520 working onthe target address (block 1212). If CAPP 110 determines at block 1204that the target address missed SNMs 520 and hit one of MMs 532, thenCAPP 110 utilizes, as the CAPP coherence state, the coherence stateindicated by the MM 532 working on the target address (block 1214). IfCAPP determines at block 1206 that the target address missed SNMs 520and MMs 532 and hit an entry in precise directory 1102, then CAPP 110utilizes, as the CAPP coherence state, the coherence state indicated bythe matching entry in precise directory 1102 (block 1216). Finally, ifCAPP determines at block 1208 that the target address missed SNMs 520,MMs 532 and precise directory 1102 and hit in coarse directory 1100,then CAPP 110 utilizes, as the CAPP coherence state, the coherence stateindicated by the matching entry in coarse directory 1100 (block 1218).Following any of blocks 1212-1218, the process of FIG. 12 ends at block1220.

With reference now to FIG. 13, there is illustrated a high level logicalflowchart of an exemplary method by which a CAPP 110 implements cachemanagement commands of the AP 104 in an embodiment having a hybrid CAPPdirectory 512 including a coarse directory 1100 and a precise directory1102. The process of FIG. 13 may be performed, for example, in responseto an explicit directory write command or as part of the directoryupdate operations performed at block 632 of FIG. 6 in response to asuccessful AP request.

The process of FIG. 13 begins at block 1300 and then proceeds to block1302, which illustrates CAPP 110 determining which directory ordirectories were specified by the associated AP 104 (e.g., in adirectory write command or in an AP request) to track a given memoryblock containing one or more cachelines. If AP 104 specified that thememory block be tracked by coarse directory 1100, then, if required(i.e., if such an entry does not already reside in coarse directory1100), CAPP 110 installs an entry corresponding to the memory block incoarse directory 1100, as shown at block 1304. For example, if AP 104determines that it is to produce or consume a data set comprisingnumerous contiguous cachelines of data, AP 104 may instruct CAPP 110 toinstall a corresponding entry representing the contiguous cachelines incoarse directory 1100. If, for example, AP 104 is to consume the dataset, AP 104 may instruct CAPP 110 to establish the entry in coarsedirectory 1100 in the first of a series of RWITM requests that load thedata set into AP cache 550 for processing by AP 104. As shown at block1306, CAPP 110 preferably sets the coherence state field of the entry incoarse directory 1100 to a coherence state reflect the highest coherencestate of all the cachelines in the associated memory block. Thus, if thecoherence state of at least one cacheline in the associated memory blockis Modified (as would be the case following a RWITM request successfullyloading an initial cacheline of a set of multiple contiguouscachelines), the coherence state field of the entry in coarse directory1100 would be set to the Modified coherence state at block 1306.Following block 1306, the process of FIG. 13 ends at block 1320.

In response to a determination at block 1302 that AP 104 has specifiedthat an entry is to be installed in precise directory 1102 (e.g., solelyor in addition to the installation of an entry in coarse directory1100), CAPP 110 installs an entry corresponding to a particularcacheline into precise directory 1102, if needed (block 1310). AP 104may opt to install an entry in precise directory 1102, for example, ifcontention for the cacheline is experienced or if AP 104 has completedproducing a data set including the cacheline and is now ready for thecacheline to be sourced via CAPP 110 to one or more consumers in dataprocessing system 200. As shown at block 1312, CAPP 110 additionallysets the coherence field of the entry in precise directory 1102 asindicated, for example, by a combined response for a request targetingthe cacheline or as specified by AP 104. Thereafter, the process of FIG.13 ends at block 1320.

Referring now to FIG. 14, there is depicted a high level logicalflowchart of an exemplary method by which a CAPP 110 determines anpartial response (Presp) for a snooped request in an embodiment having ahybrid CAPP directory 512 including a coarse directory 1100 and aprecise directory 1102. The illustrated process may be performed, forexample, in response to a CAPP 110 snooping a memory access request, asillustrated block 710 of FIG. 7.

The process of FIG. 14 begins at block 1400 and then proceeds to block1402, which depicts a determination of whether or not the target addressof the snooped memory access request hit or missed in SNMs 1202, MMs1204 and CAPP directory 512, as illustrated, for example, at block 706of FIG. 7 and at blocks 1202-1208 of FIG. 12. In response to adetermination that the target address of the snooped memory accessrequest missed in CAPP 110, CAPP 110 may provide a Null Presp, as shownat block 1404. Following block 1404, the process of FIG. 14 ends atblock 1412.

Referring again to block 1402, in response to a determination at thetarget address of the snooped memory access hit in CAPP 110, CAPP 110determines the appropriate Presp based on the snooped memory accessrequest and the composite CAPP coherence state determined according tothe process of FIG. 12, as depicted at block 1406. For memory accessrequests that hit solely in coarse directory 1100, CAPP 110 cannotintervene the target cacheline or update the coherence state of thetarget cacheline in coarse directory 1100 because the coarse directoryentry represents a granule including multiple cachelines. Accordingly,as shown at blocks 1408-1410, in at least cases in which the memoryaccess request hit solely in coarse directory 1100, CAPP 110 notifies AP104 of the hit in coarse directory 1100, thus indicating to AP 104 aneed to install an entry for the target cacheline in precise directory1102. Thereafter, in response to a directory write command from AP 104instructing CAPP 110 to install an entry for the target address inprecise directory 1102, CAPP 110 installs an entry in precise directory1102 utilizing the coherence state specified by AP 104 (AP 104 tracksthe precise state of the relevant cacheline in its AP directory 550).The installation of the entry in precise directory 1102 enables CAPP 110to thereafter service the memory access request if retried by therequester.

For example, if the target address of a snooped RWITM or DClaim requesthit solely in coarse directory 1100 in a non-HPC coherence state (e.g.,S), then CAPP 110 determines a Shared Presp at block 1406 (where theShared Presp indicates that AP cache 106 may possibly hold a copy of thetarget cacheline) and notifies AP 104 at block 1410. In response to theShared Presp, the requesting master initiates a background kill (BKill)operation, which continues until AP 104 installs the target cachelineinto precise directory 1102. Once the target cacheline is installed incoarse directory 1102, the BKill operation is allowed to complete,either because the individual target cacheline is updated by CAPP 110from Shared to Invalid in precise directory 1102 or because the targetcacheline was not in (i.e., was a hole in) the coarse granule and wasinstalled by AP 104 into coarse directory 1102 in the Invalid coherencestate.

As another example, if the target address of a snooped memory accessrequest hit solely in coarse directory 1100 in an HPC coherence state(e.g., M or T), then CAPP 110 determines a Retry Presp at block 1406 andnotifies AP 104 at block 1410. The Retry Presp is provided in this casebecause CAPP 110 cannot appropriately service a memory access requestdirected to a particular target cacheline by reference to the coherencestate of the coarse directory entry of the granule containing the targetcacheline, as the granule's coherence state may not be the actualcoherence state of the individual target cacheline. In response to theRetry Presp, which would indicate a possibly protecting HPC to therequesting master, the requesting master continues to reissue the memoryaccess request for the target cacheline until AP 104 installs the targetcacheline into precise directory 1102. Once the target cacheline isinstalled into precise directory 1102, CAPP 110 can either intervene thetarget cacheline (because the target cacheline was held in the coarsegranule), or the memory access request is serviced by the LPC (e.g., asystem memory 204) because the target cacheline was not in (i.e., was ahole in) the coarse granule and was installed into coarse directory 1102in the Invalid coherence state by AP 104.

Following block 1408 or 1410, the process of FIG. 14 ends at block 1412.

With reference now to FIG. 15, there is illustrated a high level logicalflowchart of an exemplary method by which an AP 104 manages a hybridCAPP directory 512 including a coarse directory 1100 and a precisedirectory 1102. The process of FIG. 15 begins at block 1500 and thenproceeds to block 1502, which depicts AP 104 determining whether or notAP 104 has received notification from CAPP 110 of a snooped memoryaccess request that hit in coarse directory 1100, for example, asdescribed above with reference to block 1410. (It should be appreciatedthat CAPP 110 may supply such notifications to AP 104 in cases in whichthe snooped memory access request hits in one or more of SNMs 520, MMs532 and precise directory 1102.) In response to a negativedetermination, the process iterates at block 1502. If, however, AP 104determines at block 1502 that it has received a notification from theassociated CAPP 110 of a snooped memory access request that hit incoarse directory 1100, AP 104 determines at block 1504 whether or notthe target address of the memory access request is a hole in the coarsegranule, that is, whether or not AP cache directory 550 indicates anInvalid state for the target address. In response to an affirmativedetermination at block 1504, AP 104 issues a directory write commanddirecting CAPP 110 to install into precise directory 1102 a preciseentry for the target cacheline indicating the Invalid coherence state(block 1506). Thereafter, the process of FIG. 15 ends at block 1520.

Returning to block 1504, in response to AP 104 determining that thetarget cacheline is not a hole in the coarse granule, the processproceeds to block 1508, which illustrates AP 104 issuing a directorywrite command directing CAPP 110 to install into precise directory 1102a precise entry for the target cacheline using the coherence state ofthe coarse directory entry. In addition, AP 104 marks the targetcacheline as a hole in the coarse granule, for example, in a bit vectorin which each bit represents a corresponding cacheline in the coarsegranule. As will be appreciated, the number of bits marked in the bitvector (e.g., set to a predetermined one of “1” or “0”) provides ameasure of how “holey” the granule associated with the coarse directoryentry is. At block 1510, AP 104 may additionally determine whether ornot the number of holes (i.e., invalid cachelines) in the coarse granulesatisfies (e.g., is equal to or greater than) a decomposition threshold.This determination can be made, for example, by a population count ofbits set to a selected state (i.e., “1” or “0”) in the corresponding bitvector. In response to a negative determination at block 1510, theprocess of FIG. 15 ends at block 1520. If, however, AP 104 determines atblock 1510 that the decomposition threshold is satisfied for the coarsegranule containing the target cacheline, AP 104 instructs CAPP 110 todecompose the corresponding entry in coarse directory 1100. Inparticular, AP 104 instructs CAPP 110 to install in precise directory1102 one or more entries corresponding to valid cachelines within theassociated coarse granule (e.g., an entry for each cacheline held in APcache 106 in a data-valid coherence state) and to invalidate therelevant entry in coarse directory 1100. Following block 1512, theprocess of FIG. 15 ends at block 1520.

In an alternative process, at block 1512 AP 104 may instead beconfigured to or may choose to (e.g., based on dynamic workload or aselected operating mode) initiate writeback to system memory 204 of anymodified cachelines within the granule represented by the entry incoarse directory 1100, creating a progressively more “holey” entry. Inresponse to completion of the writeback of any modified cachelines inthe coarse granule represented by the entry in coarse directory 1100, AP104 can then invalidate the entry in coarse directory 1100, thus freeingCAPP 110 from the responsibility for intervening requested cachelines inthe granule and allowing any requesters to satisfy memory accessrequests targeting the granule from system memory 204 (or anotherintervening cache).

FIG. 15 illustrates a particular implementation of demand-baseddirectory management process in which AP 104 performs directorymanagement operations on coarse directory 1100 in response to receipt ofnotification by CAPP 110 of snooped memory access requests that hit incoarse directory 1100. It should be appreciated that the describedprocess is merely exemplary and alternative or additional directorymanagement techniques, including those initiated by AP 104 in theabsence of a snooped memory access request hitting in coarse directory1100, may be employed. Further, it should be appreciated that AP 104 mayoptionally employ a corresponding process to compose coarse directoryentries from multiple precise directory entries as needed to accommodateits current workload and to free storage space in precise directory1102.

Referring now to FIG. 16, there is depicted a block diagram of anexemplary design flow 1600 used for example, in semiconductor IC logicdesign, simulation, test, layout, and manufacture. Design flow 1600includes processes, machines and/or mechanisms for processing designstructures or devices to generate logically or otherwise functionallyequivalent representations of the design structures and/or devicesdescribed above and shown in FIGS. 1-3, 5 and 11. The design structuresprocessed and/or generated by design flow 1600 may be encoded onmachine-readable transmission or storage media to include data and/orinstructions that when executed or otherwise processed on a dataprocessing system generate a logically, structurally, mechanically, orotherwise functionally equivalent representation of hardware components,circuits, devices, or systems. Machines include, but are not limited to,any machine used in an IC design process, such as designing,manufacturing, or simulating a circuit, component, device, or system.For example, machines may include: lithography machines, machines and/orequipment for generating masks (e.g. e-beam writers), computers orequipment for simulating design structures, any apparatus used in themanufacturing or test process, or any machines for programmingfunctionally equivalent representations of the design structures intoany medium (e.g. a machine for programming a programmable gate array).

Design flow 1600 may vary depending on the type of representation beingdesigned. For example, a design flow 1600 for building an applicationspecific IC (ASIC) may differ from a design flow 1600 for designing astandard component or from a design flow 1600 for instantiating thedesign into a programmable array, for example a programmable gate array(PGA) or a field programmable gate array (FPGA) offered by Altera® Inc.or Xilinx® Inc.

FIG. 16 illustrates multiple such design structures including an inputdesign structure 1620 that is preferably processed by a design process1610. Design structure 1620 may be a logical simulation design structuregenerated and processed by design process 1610 to produce a logicallyequivalent functional representation of a hardware device. Designstructure 1620 may also or alternatively comprise data and/or programinstructions that when processed by design process 1610, generate afunctional representation of the physical structure of a hardwaredevice. Whether representing functional and/or structural designfeatures, design structure 1620 may be generated using electroniccomputer-aided design (ECAD) such as implemented by a coredeveloper/designer. When encoded on a machine-readable datatransmission, gate array, or storage medium, design structure 1620 maybe accessed and processed by one or more hardware and/or softwaremodules within design process 1610 to simulate or otherwise functionallyrepresent an electronic component, circuit, electronic or logic module,apparatus, device, or system such as those shown in FIGS. 1-3, 5 and 11.As such, design structure 1620 may comprise files or other datastructures including human and/or machine-readable source code, compiledstructures, and computer-executable code structures that when processedby a design or simulation data processing system, functionally simulateor otherwise represent circuits or other levels of hardware logicdesign. Such data structures may include hardware-description language(HDL) design entities or other data structures conforming to and/orcompatible with lower-level HDL design languages such as Verilog® andVHDL, and/or higher level design languages such as C or C++.

Design process 1610 preferably employs and incorporates hardware and/orsoftware modules for synthesizing, translating, or otherwise processinga design/simulation functional equivalent of the components, circuits,devices, or logic structures shown in FIGS. 1-3, 5 and 11 to generate anetlist 1680 which may contain design structures such as designstructure 1620. Netlist 1680 may comprise, for example, compiled orotherwise processed data structures representing a list of wires,discrete components, logic gates, control circuits, I/O devices, models,etc. that describes the connections to other elements and circuits in anintegrated circuit design. Netlist 1680 may be synthesized using aniterative process in which netlist 1680 is resynthesized one or moretimes depending on design specifications and parameters for the device.As with other design structure types described herein, netlist 1680 maybe recorded on a machine-readable storage medium or programmed into aprogrammable gate array. The medium may be a non-volatile storage mediumsuch as a magnetic or optical disk drive, a programmable gate array, acompact flash, or other flash memory. Additionally, or in thealternative, the medium may be a system or cache memory, or bufferspace.

Design process 1610 may include hardware and software modules forprocessing a variety of input data structure types including netlist1680. Such data structure types may reside, for example, within libraryelements 1630 and include a set of commonly used elements, circuits, anddevices, including models, layouts, and symbolic representations, for agiven manufacturing technology (e.g., different technology nodes, 32 nm,45 nm, 90 nm, etc.). The data structure types may further include designspecifications 1640, characterization data 1650, verification data 1660,design rules 1670, and test data files 1685 which may include input testpatterns, output test results, and other testing information. Designprocess 1610 may further include, for example, standard mechanicaldesign processes such as stress analysis, thermal analysis, mechanicalevent simulation, process simulation for operations such as casting,molding, and die press forming, etc. One of ordinary skill in the art ofmechanical design can appreciate the extent of possible mechanicaldesign tools and applications used in design process 1610 withoutdeviating from the scope and spirit of the invention. Design process1610 may also include modules for performing standard circuit designprocesses such as timing analysis, verification, design rule checking,place and route operations, etc.

Design process 1610 employs and incorporates logic and physical designtools such as HDL compilers and simulation model build tools to processdesign structure 1620 together with some or all of the depictedsupporting data structures along with any additional mechanical designor data (if applicable), to generate a second design structure 1690.Design structure 1690 resides on a storage medium or programmable gatearray in a data format used for the exchange of data of mechanicaldevices and structures (e.g., information stored in a IGES, DXF,Parasolid XT, JT, DRG, or any other suitable format for storing orrendering such mechanical design structures). Similar to designstructure 1620, design structure 1690 preferably comprises one or morefiles, data structures, or other computer-encoded data or instructionsthat reside on transmission or data storage media and that whenprocessed by an ECAD system generate a logically or otherwisefunctionally equivalent form of one or more of the embodiments of theinvention shown in FIGS. 1-3, 5 and 11. In one embodiment, designstructure 1690 may comprise a compiled, executable HDL simulation modelthat functionally simulates the devices shown in FIGS. 1-3, 5 and 11.

Design structure 1690 may also employ a data format used for theexchange of layout data of integrated circuits and/or symbolic dataformat (e.g., information stored in a GDSII (GDS2), GL1, OASIS, mapfiles, or any other suitable format for storing such design datastructures). Design structure 1690 may comprise information such as, forexample, symbolic data, map files, test data files, design contentfiles, manufacturing data, layout parameters, wires, levels of metal,vias, shapes, data for routing through the manufacturing line, and anyother data required by a manufacturer or other designer/developer toproduce a device or structure as described above and shown in FIGS. 1-3,5 and 11. Design structure 1690 may then proceed to a stage 1695 where,for example, design structure 1690: proceeds to tape-out, is released tomanufacturing, is released to a mask house, is sent to another designhouse, is sent back to the customer, etc.

As has been described, a coherent attached processor proxy (CAPP)includes transport logic having a first interface configured to supportcommunication with a system fabric of a primary coherent system and asecond interface configured to support communication with an attachedprocessor (AP) that is external to the primary coherent system and thatincludes a cache memory that holds copies of memory blocks belonging toa coherent address space of the primary coherent system. The CAPPfurther includes one or more master machines that initiate memory accessrequests on the system fabric of the primary coherent system on behalfof the AP, one or more snoop machines that service requests snooped onthe system fabric, and a CAPP directory having a precise directoryhaving a plurality of entries each associated with a smaller datagranule and a coarse directory having a plurality of entries eachassociated with a larger data granule.

While various embodiments have been particularly shown as described withreference to a preferred embodiment, it will be understood by thoseskilled in the art that various changes in form and detail may be madetherein without departing from the spirit and scope of the claims. Forexample, although aspects have been described with respect to a computersystem executing program code that directs the functions of the presentinvention, it should be understood that present invention mayalternatively be implemented as a program product including acomputer-readable storage device (e.g., volatile or non-volatile memory,optical or magnetic disk or other statutory manufacture) that storesprogram code that can be processed by a data processing system. Further,the term “coupled” as used herein is defined to encompass embodimentsemploying a direct electrical connection between coupled elements orblocks, as well as embodiments employing an indirect electricalconnection between coupled elements or blocks achieved using one or moreintervening elements or blocks. In addition, the term “exemplary” isdefined herein as meaning one example of a feature, not necessarily thebest or preferred example.

What is claimed is:
 1. A method of data processing, comprising: at acoherent attached processor proxy (CAPP) of a primary coherent systemthat serves as a participant in coherent communication within theprimary coherent system on behalf of an attached processor (AP) externalto the primary coherent system, maintaining, in a CAPP directory,entries corresponding to cachelines of interest to the AP that belong toa coherent address space of the primary coherent system, wherein themaintaining includes maintaining in a precise directory a plurality ofentries each associated with a respective one of a plurality of smallerdata granules and maintaining in a coarse directory a plurality ofentries each associated with a respective one of a plurality of largerdata granules; the CAPP participating in coherent communication on asystem fabric of the primary coherent system on behalf of the AP byreference to the coarse directory and the precise directory; and theCAPP installing an entry in the coarse directory in a data-validcoherence state in advance of receipt of all of the larger data granuleby the AP.
 2. The method of claim 1, wherein: the smaller data granulecomprises a single cacheline of data; and the larger data granulecomprises a plurality of contiguous cachelines.
 3. The method of claim1, and further comprising: in response to at least one AP command, theCAPP decomposes an entry in the coarse directory into a plurality ofentries in the precise directory.
 4. A method of data processing,comprising: at a coherent attached processor proxy (CAPP) of a primarycoherent system that serves as a participant in coherent communicationwithin the primary coherent system on behalf of an attached processor(AP) external to the primary coherent system, maintaining, in a CAPPdirectory, entries corresponding to cachelines of interest to the APthat belong to a coherent address space of the primary coherent system,wherein the maintaining includes maintaining in a precise directory aplurality of entries each associated with a respective one of aplurality of smaller data granules and maintaining in a coarse directorya plurality of entries each associated with a respective one of aplurality of larger data granules; the CAPP participating in coherentcommunication on a system fabric of the primary coherent system onbehalf of the AP by reference to the coarse directory and the precisedirectory; and the CAPP determining a composite coherence state for atarget address by prioritizing a coherence state indicated by theprecise directory over a coherence state indicated by the coarsedirectory.
 5. A method of data processing, comprising: at a coherentattached processor proxy (CAPP) of a primary coherent system that servesas a participant in coherent communication within the primary coherentsystem on behalf of an attached processor (AP) external to the primarycoherent system, maintaining, in a CAPP directory, entries correspondingto cachelines of interest to the AP that belong to a coherent addressspace of the primary coherent system, wherein the maintaining includesmaintaining in a precise directory a plurality of entries eachassociated with a respective one of a plurality of smaller data granulesand maintaining in a coarse directory a plurality of entries eachassociated with a respective one of a plurality of larger data granules;the CAPP participating in coherent communication on a system fabric ofthe primary coherent system on behalf of the AP by reference to thecoarse directory and the precise directory; and in response to a targetaddress of a snooped memory access request missing in the precisedirectory and hitting in the coarse directory, the CAPP providing aRetry response and installing an entry corresponding to the targetaddress in the precise directory.